package com.trtan.hr.controller;

import com.trtan.hr.dao.MenuDao;
import com.trtan.hr.pojo.Hr;
import com.trtan.hr.pojo.Menu;
import com.trtan.hr.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: trtan
 * @create: 2021-03-06 14:48
 * @description:
 **/
@RestController
@RequestMapping("/home/config")
public class ConfigController {
    @Autowired
    MenuDao menuDao;
    @RequestMapping("/sys_menu")
    public List<Menu> sysMenu() {
        return menuDao.getMenusByHrId(Hr.getCurrentHr().getId(), 1);
    }
}
